-
Notifications
You must be signed in to change notification settings - Fork 2
Deprecate misspell and replace it with typos #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
133f55f to
ab1c742
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces the deprecated misspell linter with typos for spell checking across the repository. The migration introduces a new typos configuration system, updates build tools and CI workflows, and adds validation to prevent use of the deprecated configuration.
- Adds a new
typosconfiguration section with support for excluding files and customizing word mappings - Removes
misspellfrom golangci-lint and GitHub Actions workflows, replacing it with thetyposaction - Adds validation to fail fast if the deprecated
spellCheck.ignoreWordsconfiguration is used
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/core/config.go | Adds TyposConfiguration struct, deprecates SpellCheckConfiguration, adds validation to enforce migration |
| internal/core/constants.go | Replaces MisspellAction constant with TyposAction constant |
| internal/typos/typos.go | New package implementing typos configuration rendering with automatic exclusion of go.mod and vendor/ |
| internal/typos/typos.toml.tmpl | Template for generating .typos.toml configuration file |
| internal/golangcilint/golangci_lint.go | Removes MisspellIgnoreWords from template data |
| internal/golangcilint/golangci.yaml.tmpl | Removes misspell linter and its ignore-rules configuration |
| internal/ghworkflow/workflow_checks.go | Replaces misspell action with typos action, removes unused imports and permission requirements |
| internal/makefile/makefile.go | Adds run-typos target generation when typos is enabled |
| internal/nix/nix-shell.go | Adds typos to nix packages list when enabled |
| main.go | Adds typos.RenderConfig call when typos is enabled |
| shell.nix | Adds typos to nix shell dependencies |
| Makefile | Adds run-typos target with installation instructions |
| README.md | Updates documentation replacing spellCheck section with typos section including configuration examples |
| .typos.toml | New typos configuration file for the project itself |
| .golangci.yaml | Removes misspell linter from enabled linters list |
| .github/workflows/checks.yaml | Replaces misspell action with typos action, removes pull-requests permission |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
c6e2779 to
85cedf5
Compare
majewsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good, and GHE allowlist was extended. Please address the CI error, then this is good to go.
|
This is what I mean by misspell doesn't find things 😂 |
85cedf5 to
ee830dd
Compare
ee830dd to
a01d9e7
Compare
Merging this branch will decrease overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
majewsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good, and GHE allowlist was extended. Please address the CI error, then this is good to go.
| "CLICOLOR": "1", | ||
| }, | ||
| }) | ||
| j.addStep(jobStep{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always, surprising actions should be documented.
| j.addStep(jobStep{ | |
| // TyposAction drops its binary into the repository root; if we do not clean this up, | |
| // `reuse lint` will complain about it not having license information | |
| j.addStep(jobStep{ |
Closes #259